# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=deepin-session-ui-git
pkgver=5.5.6.r19.g9cf5bae1
pkgrel=1
sourcename=dde-session-ui
sourcetar="$sourcename"_"$pkgver".tar.xz
pkgdesc='Deepin desktop-environment - Session UI module'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dde-session-ui"
license=('GPL3')
groups=('deepin')
depends=('gsettings-qt' 'startdde-git' 'liblightdm-qt5' 'qt5-svg' 'deepin-daemon-git' 'deepin-dock-git' 'deepin-wallpapers-git' 'deepin-pw-check-git')
makedepends=('git' 'deepin-gettext-tools-git' 'cmake' 'ninja' 'qt5-tools' 'deepin-dock-git' 'gtest' 'gcovr'
             'dtkcommon-git' 'dtkcore-git')
provides=('deepin-notifications' 'deepin-session-ui')
conflicts=('dde-workspace' 'deepin-session-ui' 'deepin-notifications')
groups=('deepin-git')
source=($sourcetar)
sha512sums=('SKIP')

prepare() {
    cd $sourcename

  sed -i 's|/usr/share/backgrounds/default_background.jpg|/usr/share/backgrounds/deepin/desktop.jpg|' widgets/*.cpp
}

build() {
  cd $sourcename
  cmake -B build -GNinja -DCMAKE_INSTALL_PREFIX=$pkgdir/usr
  cmake --build build
}

package() {
  cd $sourcename
  cmake --install build
}
